#pragma once
#include "ILight.h"

class CDirectionalLight : public ILight
{
private:
	
	CVector3f	m_direction;			//direction in global coordinates
	CVector3f	m_viewDirection;		//direction in view coordinates

public:
	CDirectionalLight();
	CDirectionalLight(const CColor& color, const CVector3f& direction);
	~CDirectionalLight();

	CColor computeColor(const CRay& ray, float dist)const;
	void computeShadowRay(const CVector3f& point, CRay& shadowRay, float* distance)const;
	void applyViewMatrix(const CMatrix& view);

	//set the direction of the Directional Light
	void setDirection(const CVector3f& direction);

};